home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
amok_lha
/
amok59.lha
/
AmokEd_V1.02b
/
txt
/
EdCmd3.mod
< prev
next >
Wrap
Text File
|
1993-08-15
|
1KB
|
56 lines
(*************************************************************************
:Program. EdCmd3.mod
:Contents. Commands for AmokEd
:Author. Hartmut Goebel
:Language. Oberon
:Translator. Amiga Oberon Compiler V1.17.1
:Imports. SupLib (Hartmut Goebel)
:History. V1.0, 21 Apr 1991 Hartmut Goebel [hG]
:Date. 13 Aug 1991 23:30:22
*************************************************************************)
MODULE EdCmd3;
IMPORT
edD: EdDisplay,
edE: EdErrors,
edG: EdGlobalVars,
edM: EdMovement;
CONST
insert* = 0;
PROCEDURE doOverWrite*;
VAR
insertMode: BOOLEAN;
BEGIN
insertMode := edG.insertMode IN edG.Text.status;
IF ~(insert IN edG.ArgSet) THEN EXCL(edG.Text.status,edG.insertMode);
ELSE INCL(edG.Text.status,edG.insertMode); END;
edM.TextWrite(edG.Arg[0]);
IF insertMode THEN INCL(edG.Text.status,edG.insertMode);
ELSE EXCL(edG.Text.status,edG.insertMode); END;
END doOverWrite;
PROCEDURE doSwapChar*;
VAR
i: INTEGER;
ch: CHAR;
BEGIN
i := edG.Text.pos;
IF i < edG.LineBufferLen-1 THEN
ch := edG.LineBuffer[i];
edG.LineBuffer[i] := edG.LineBuffer[i+1];
edG.LineBuffer[i+1] := ch;
edD.TextRedisplayCurrentLine;
ELSE
edG.Rc := edE.cmdFailed;
END;
END doSwapChar;
END EdCmd3.